package com.ruoyi.web.service;

import com.ruoyi.web.domain.user.Company;
import com.ruoyi.web.mapper.CompanyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyService implements ICompanyService {
    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public Company getByUserId(Long userId) {
        return companyMapper.selectCompanyByUserId(userId);
    }

    @Override
    public Company getById(Long companyId) {
        return companyMapper.selectCompanyById(companyId);
    }

    @Override
    public List<Company> getAllCompanies() {
        return null;
    }

    @Override
    public List<Company> selectPageWithUsers(Company company) {
        return companyMapper.selectList(company);
    }
}